{% extends "base_sub.html" %}
{% set login_member = request.state.login_member %}

{% block title %}{{ login_member.mb_nick }}您的观点历史记录{% endblock title %}

{% block content %}
<div id="point" class="new_win">
    <h1 id="win_title">{{ login_member.mb_nick }}您的观点历史记录</h1>
    <div class="new_win_con2">
        <ul class="point_all m-4 rounded-3 main-bg text-white fs-5 p-4">
            <li class="full_li d-flex justify-content-between fw-bold fs-4 text-white">
                <span>保持点</span>
                <span>{{ login_member.mb_point|number_format }}</span>
            </li>
        </ul>
        <ul class="point_list">
        {% for point in points %}
            <li class="{% if not point.is_positive %}point_use bov-bg{% endif %} position-relative main-bb cont-bg py-4 px-5 list-unstyled">
                <div class="point_top py-2 mb-2">
                    <span class="point_tit d-block fw-bold fs-5 main-font">{{ point.po_content }}</span>
                    <span class="point_num position-absolute fs-4 em-font fw-bold translate-middle-y top-50" style="right: 30px;">
                        {% if point.is_positive -%}
                            +
                        {%- endif -%}
                        {{ point.po_point|number_format }}
                    </span>
                </div>
                <span class="point_date1 fs-5">
                    <i class="fa fa-regular fa-clock" aria-hidden="true"></i>
                    {{ point.po_datetime }}
                </span>
                <span class="point_date {% if point.po_expired %}txt_expired{% endif %}" style="margin-left:5px;">
                {%- if point.is_positive -%}
                    {%- if point.po_expired -%}
                        到期 {{ point.po_expire_date|datetime_format("%Y-%m-%d") }}
                    {%- elif point.po_expire_date|datetime_format("%Y-%m-%d")  == "9999-12-31" -%}
                        &nbsp;
                    {%- else -%}
                        | 过期 : {{ point.po_expire_date|datetime_format("%Y-%m-%d") }}
                    {%- endif -%}
                {%- endif -%}
                </span>
            </li>
        {% endfor %}
            
            <li class="point_status border-0 text-white fw-bold fs-5 text-start py-4 px-5" style="background: #737373;">
                小
                <span>+{{ sum_points.positive|number_format }}</span>
                <span>{{ sum_points.negative|number_format }}</span>
            </li>
        </ul>
    </div>
    {{ paging|safe }}
    <button type="button" onclick="javascript:window.close();" class="btn_close d-block">窗口关闭</button>
</div>
{% endblock content %}